home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / reform16.zip / REFORMAT.DOC < prev    next >
Text File  |  1990-03-03  |  9KB  |  196 lines

  1.   2 March 1990                                            Reformat - 1 -
  2.  
  3.  
  4.                 REFORMAT: an original JOS disk tool.
  5.                             Version 1.60
  6.  
  7.                    Use this program as follows:
  8.  
  9.       REFORMAT [d[:]]  where d: is  the drive containing the disk to be
  10.  reorganized. If you don't specify a drive, you'll be prompted for it.
  11.  
  12.       REFORMAT ? will present a helpscreen.
  13.  
  14.       The performance of disk I/O becomes bad when when a disk has been
  15.  used for a long time,  because files will not be contiguous, and files
  16.  that are used  concurrently will not be in adjacent parts of the disk.
  17.  Files on often  used disk ( floppy or fixed ) tend to become scattered
  18.  all over the disk. Not only files that are several times extended, but
  19.  after a while also  new  files  will not be contiguous,  when created.
  20.  Consider a disk  with a lot of files.  Erasing a number of small files
  21.  will  free clusters that are  randomly distributed  among the occupied
  22.  clusters,  so a new larger  file will be  broken  up in a lot of small
  23.  pieces. For files that are read sequentially this is only a small loss
  24.  of efficiency, but when reading or writing a random access file like a
  25.  database, performance is  very low.  Not only  head movements from one
  26.  from one cluster to another will have a  bad  effect  on  performance,
  27.  since in DOS 2.xx, the  total FAT is not kept in  memory.  Accessing a
  28.  widely scattered  file might cause extra head movement when DOS has to
  29.  read another part of the FAT.
  30.       A program reading or writing more than  one file at  random, will
  31.  suffer from bad I/O performance if the files  are  not close together
  32.  on the disk. The subdirectory facility under DOS only  provides a kind
  33.  of 'administrative adjacency', not physical adjacency.
  34.       This all is important for fixed disks in the first place, but for
  35.  floppy  disks also,  because head  movements on floppy disk drives are
  36.  rather slow, as is the head settling time.
  37.  
  38.       To  solve  this  problem  I have  written the *REFORMAT* program.
  39.  REFORMAT  will look at all files on a disk, both in the root directory
  40.  and in all subdirectories, to find out whether they are contiguous. If
  41.  at least one  file (or subdirectory) is  found not to be contiguous, a
  42.  complete reorganization  of the disk is done.  If none of the files is
  43.  incontiguous,  but the file order could be better, the program prompts
  44.  you whether or not to start the reorganization.
  45.  
  46.  This reorganization consists of the following:
  47.  
  48.  1) Root directory and all subdirectories are cleaned of erased entries.
  49.     This  should  optimize   the  time   DOS  needs  to find an entry,
  50.     especially in  directories  that  contain  a  great deal  of erased
  51.     files. The order of entries in a (sub)directory is never changed.
  52.  
  53.  
  54.   2 March 1990                                            Reformat - 2 -
  55.  
  56.  2) All files are made contiguous.
  57.  
  58.  3) Files and subdirectories are moved, as far as necessary:
  59.     Every (sub)directory is immediately followed  by  all the  files it
  60.     owns, followed by all the subdirectories it is parent of. Using the
  61.     last sentence  recursively, the  place of every file on the disk is
  62.     determined now.
  63.     Due to  the algorithm used, the  order in  which subdirectories are
  64.     written to disk is the  reversed of the  order in which they appear
  65.     in the parent directory. The order for the files is never changed.
  66.  
  67.  Placing all files in a subdirectory closely together on disk minimizes
  68.  head movements when accessing multiple files in a program:  place them
  69.  in the same subdirectory, and after REFORMAT they are physically close
  70.  together on the disk.
  71.  
  72.  REFORMAT  presents a screen with  information  about  the disk and the
  73.  files. The number of dataclusters to be moved is also presented.  This
  74.  number will in some cases be greater than the number of used clusters.
  75.  This is not an error, but it is necessary to move unused clusters that
  76.  appear between the used clusters.
  77.  
  78.  * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING *
  79.  
  80.  NEVER,  NEVER run REFORMAT on a disk that contains protected software,
  81.  because it could ruin part of the protection scheme, or even the whole
  82.  disk. Some disk  optimizers leave  hidden files  on a disk unaffected.
  83.  REFORMAT affects *ALL* files, regardless of their attributes.  Leaving
  84.  hidden files  unaffected is not always  save with  regard to protected
  85.  software. Since there are a number of programs that easily change file
  86.  attributes, files  meant to be  hidden may have  been  made  unhidden.
  87.  (I have seen IBMBIO.COM and IBMDOS.COM  on  some  disks with a  normal
  88.  DIR  command).  Therefore:   protected  software  should  *ALWAYS*  be
  89.  removed  from a disk (UNINSTALL or something like that) before running
  90.  REFORMAT. In case you run  REFORMAT  on a fixed disk, the program will
  91.  prompt you to confirm that no protected  software is on the disk, just
  92.  before the actual reformatting wil start.
  93.  
  94.                     * * * * * * * * * * * * * *
  95.  
  96.  Although much effort has  been spent to  create a reliable program, it
  97.  is strongly recommended that you make a backup of your disk before you
  98.  run REFORMAT. The program is pretty fast: about 20 minutes for a 20Meg
  99.  disk, full for 75%, and looking like a 'Swiss cheese' in NORTON's.
  100.  During the actual REFOMATting, clusters are moved around  on the disk,
  101.  without the program knowing to which file they belong.  This is a very
  102.  dangerous operation, and a crash  will almost  surely leave  your disk
  103.  partially or totally unusable.  In case of a  read or write  error the
  104.  program  prompts you  with the question  whether  to  Abort, Retry, or
  105.  
  106.  
  107.   2 March 1990                                           Reformat - 3 -
  108.  
  109.  Ignore the error. The Ignore  option is  available only after a change
  110.  to the  disk has been  made by the program.  Always try some  Retries,
  111.  before going to Ignore. The Ignore option is provided to  minimize the
  112.  loss of data: since  data are read and written one  cluster at a time,
  113.  an Ignore will cause only one cluster to be lost. (Depending  on disk-
  114.  type, 1 to 4 Kb).  An Abort will probably  always  cause a LOT of data
  115.  to be lost. (They are still on the disk, but, as Rick said: The NORTON
  116.  utilities will just laugh at you! So be backed up!).
  117.  One of the  future  expansions of the  program will  be  an  automatic
  118.  recovery facility, by logging  changes  made  to the  disk on  another
  119.  drive.
  120.                     * * * * * * * * * * * * * *
  121.  
  122.      This program is donated to the  public domain.  No charge is asked
  123.  if you use it, but it may not be used in a commercial environment, nor
  124.  may you charge a fee for its use or for a copy of it. Commercial users
  125.  please contact me at the address below.
  126.  
  127.      Register yourself at the address below, you will receive a copy of
  128.  new program updates, as soon as they are released.
  129.  Comments, bugs etc. should be send to
  130.  
  131.                      Jos Wennmacker  <U015415@HNYKUN22.BITNET>
  132.                      Universitair Rekencentrum
  133.                      Geert Grooteplein Zuid 41
  134.                      NL-6525 GA Nijmegen
  135.                      The Netherlands.
  136.  
  137.                     * * * * * * * * * * * * * *
  138.  
  139.  If you did not download or copy a REFORMAT.COM file you should have:
  140.  
  141.  1) REFORMAT.PAS
  142. |2) REFORMAT.IN1    v1.6 Integer math routines no longer required
  143.  3) REFORMAT.IN2
  144.  4) REFORMAT.IN3
  145.  5) REFORMAT.IN4
  146.  6) REFORMAT.IN5
  147. |7) FRAME.ASM
  148.  
  149.     Run TURBO-PASCAL
  150.     a) go to the Option screen,
  151.        select C (com file to be generated when compiling)
  152.        Quit the options screen.
  153.     b) compile REFORMAT.PAS. The include files should be on the logged
  154.        drive in the current working directory.
  155.     Quit Turbo
  156.  
  157.     You now have REFORMAT.COM, just type REFORMAT d: to run it.
  158.  
  159.  
  160.   2 March 1990                                           Reformat - 4 -
  161.  
  162.  Memory Requirements:
  163.  The program needs a lot of memory. During execution space is needed to
  164.  hold at least four copies of the FAT.  Since in DOS 3.x, FATs of fixed
  165.  disks